home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Magazine / GraphicsCards / StormMesa / STARTUP.MK < prev    next >
Text File  |  1998-12-15  |  6KB  |  231 lines

  1. # MSDOS DMAKE startup file.  Customize to suit your needs.
  2. # Assumes MKS toolkit for the tool commands, and Zortech C.  Change as req'd.
  3. # See the documentation for a description of internally defined macro#
  4. # Disable warnings for macros redefined here that were given
  5. # on the command line.
  6. __.SILENT := $(.SILENT)
  7. .SILENT   := yes
  8.  
  9. # Configuration parameters for DMAKE startup.mk file
  10. # Set these to NON-NULL if you wish to turn the parameter on.
  11. _HAVE_RCS    := yes        # yes => RCS  is installed.
  12. _HAVE_SCCS    :=         # yes => SCCS is installed.
  13.  
  14. # Applicable suffix definitions
  15. A := .lib    # Libraries
  16. E := .exe    # Executables
  17. F := .for    # Fortran
  18. O := .obj    # Objects
  19. P := .pas    # Pascal
  20. S := .asm    # Assembler sources
  21. V :=         # RCS suffix
  22.  
  23. # See if these are defined
  24. TMPDIR := $(ROOTDIR)/tmp
  25. .IMPORT .IGNORE : TMPDIR SHELL COMSPEC
  26.  
  27. # Recipe execution configurations
  28. # First set SHELL, If it is not defined, use COMSPEC, otherwise
  29. # it is assumed to be MKS Korn SHELL.
  30. .IF $(SHELL) == $(NULL)
  31. .IF $(COMSPEC) == $(NULL)
  32.    SHELL := $(ROOTDIR)/bin/sh$E
  33. .ELSE
  34.    SHELL := $(COMSPEC)
  35. .END
  36. .END
  37. GROUPSHELL := $(SHELL)
  38.  
  39. # Now set remaining arguments depending on which SHELL we
  40. # are going to use.  COMSPEC (assumed to be command.com) or
  41. # MKS Korn Shell.
  42. .IF $(SHELL)==$(COMSPEC)
  43.    SHELLFLAGS  := $(SWITCHAR)c
  44.    GROUPFLAGS  := $(SHELLFLAGS)
  45.    SHELLMETAS  := *"?<>
  46.    GROUPSUFFIX := .bat
  47.    DIRSEPSTR   := \\
  48.    DIVFILE      = $(TMPFILE:s,/,\)
  49. .ELSE
  50.    SHELLFLAGS  := -c
  51.    GROUPFLAGS  :=
  52.    SHELLMETAS  := *"?<>|()&][$$\#`'
  53.    GROUPSUFFIX := .ksh
  54.    .MKSARGS    := yes
  55.    DIVFILE      = $(TMPFILE:s,/,${DIVSEP_shell_${USESHELL}})
  56.    DIVSEP_shell_yes := \\\
  57.    DIVSEP_shell_no  := \\
  58. .END
  59.  
  60. # Standard C-language command names and flags
  61.    CC      := wcl386    # C-compiler and flags
  62.    CFLAGS  +=
  63.  
  64.    AS      := tasm31        # Assembler and flags
  65.    ASFLAGS +=
  66.  
  67.    LD       = wlink        # Loader and flags
  68.    LDFLAGS +=
  69.    LDLIBS   =
  70.  
  71. # Definition of $(MAKE) macro for recursive makes.
  72.    MAKE = $(MAKECMD) $(MFLAGS)
  73.  
  74. # Language and Parser generation Tools and their flags
  75.    YACC      := yacc        # standard yacc
  76.    YFLAGS +=
  77.    YTAB      := ytab        # yacc output files name stem.
  78.  
  79.    LEX      := lex        # standard lex
  80.    LFLAGS +=
  81.    LEXYY  := lex_yy        # lex output file
  82.  
  83. # Other Compilers, Tools and their flags
  84.    PC    := any_pc        # pascal compiler
  85.    RC    := anyf77        # ratfor compiler
  86.    FC    := anyf77        # fortran compiler
  87.  
  88.    CO       := co        # check out for RCS
  89.    COFLAGS += -q
  90.  
  91.    AR     := ar            # archiver
  92.    ARFLAGS+= ruv
  93.  
  94.    RM       := del        # remove a file command
  95.    RMFLAGS +=
  96.  
  97. # Implicit generation rules for making inferences.
  98. # We don't provide .yr or .ye rules here.  They're obsolete.
  99. # Rules for making *$O
  100.    %$O : %.c ; $(CC) $(CFLAGS) -c $<
  101.    %$O : %.cpp ; $(CC) $(CFLAGS) -c $<
  102.    %$O : %$P ; $(PC) $(PFLAGS) -c $<
  103.    %$O : %$S ; $(AS) $(ASFLAGS) $(<:s,/,\);
  104.    %$O : %.cl ; class -c $<
  105.    %$O : %.e %.r %.F %$F ; $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
  106.  
  107. # Executables
  108.    %$E : %$O ; $(CC) @$(mktmp,a.lnk $(LDFLAGS)  $< $(LDLIBS))
  109.  
  110. # lex and yacc rules
  111.    %.c : %.y ; $(YACC)  $(YFLAGS) $<; mv $(YTAB).c $@
  112.    %.c : %.l ; $(LEX)   $(LFLAGS) $<; mv $(LEXYY).c $@
  113.  
  114. # RCS support
  115. .IF $(_HAVE_RCS)
  116.    % : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V;- $(CO) $(COFLAGS) $@
  117.    .NOINFER : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V
  118. .END
  119.  
  120. # SCCS support
  121. .IF $(_HAVE_SCCS)
  122.    % : s.% ; get $<
  123.    .NOINFER : s.%
  124. .END
  125.  
  126. # Recipe to make archive files.
  127. %$A :
  128. [
  129.    $(AR) $(ARFLAGS) $@ $?
  130.    $(RM) $(RMFLAGS) $?
  131. ]
  132.  
  133. # DMAKE uses this recipe to remove intermediate targets
  134. .REMOVE :; $(RM) $<
  135.  
  136. # AUGMAKE extensions for SYSV compatibility
  137. @B = $(@:b)
  138. @D = $(@:d)
  139. @F = $(@:f)
  140. "*B" = $(*:b)
  141. "*D" = $(*:d)
  142. "*F" = $(*:f)
  143. <B = $(<:b)
  144. <D = $(<:d)
  145. <F = $(<:f)
  146. #?B = $(?:b)
  147. #?F = $(?:f)
  148. #?D = $(?:d)
  149.  
  150. # watcom dir
  151. WINC =C:\watcom\h\
  152.  
  153. # Turn warnings back to previous setting.
  154. .SILENT := $(__.SILENT)
  155.  
  156. # Local init file if any, gets parsed before user makefile
  157. .INCLUDE .IGNORE: "_startup.mk"
  158.  
  159. # this is my stuff
  160. # what the various flags do
  161. # fp5 - floating point inlined for pentium
  162. # 5r  - pentium register passing
  163. # s   - remove stack check
  164. # mf  - flat memory model
  165. # zq  - operate quietly
  166. # wx  - all warnings on
  167. # d1  - simple debug info, shouldn`t affect code
  168. # d1+ - as above, but with unused names
  169. # 5s  - pentium stack passing
  170. # zp4 - pack structures to 4 bytes
  171. # hc  - do codeview style debug info
  172. # oneatx - watcom recommended optimizations for pentium (see below)
  173. # ee ep     - add epilogue, prolog hooks for profiler
  174. # et     - add rdtsc style profiler hooks
  175.  
  176. # /o optimizations
  177. # t -
  178. # e -
  179. # x -
  180. # e -
  181. # a -
  182. # n -
  183. # i -
  184. # l -
  185. # r -
  186. # + -
  187.  
  188. #CFLAGS = /oanrlt /fp5 /5r /s /mf /zq /wx
  189. #CFLAGS = /oanrlt /d2 /fp5 /5r /mf /zq /wx
  190. #CFLAGS = /oanrlt /fp5 /5r /mf /zq /wx
  191. #CFLAGS = /d2 /fp5 /5s /mf /zq /wx
  192.  
  193. # watcom pentium rec.
  194. #CFLAGS = /oneatx /zp4 /5r /fp5 /s /mf /wx
  195. #CFLAGS  = /oneatx /zp4 /5r /fp5 /s /mf /wx
  196.  
  197. # for debugging pentium stuff
  198. #CFLAGS = /d3 /zp4 /5r /fp5 /mf /wx
  199.  
  200. # for vtune
  201. #CFLAGS = /hc /d2 /zp4 /5 /fp5 /s /mf /wx /oneatx
  202.  
  203. # 486
  204. #CFLAGS = /oneatx /zp4 /4 /fp3 /s /mf /wx
  205.  
  206. # 386
  207. #CFLAGS = /oneatx /zp4 /3 /fp3 /s /mf /wx
  208.  
  209. # super inlining
  210. #CFLAGS =  /d1 /otiexanl+ /fp5 /5r /s /mf /zq /wx
  211.  
  212. # for mesa
  213. CFLAGS = /d2 /5r /fp5 /wx /DDEBUG
  214. #CFLAGS =  /otexan /zp4 /mf /5r /fp5 /wx /d1+
  215.  
  216. PROFILE = /ee /ep
  217. #CFLAGS += $(PROFILE)
  218.  
  219. PPROF = /et
  220. #CFLAGS += $(PPROF)
  221.  
  222. # 3dfx
  223. #CFLAGS += /DGLIDE_HARDWARE
  224.  
  225. #CFLAGS += /D_PC_=1
  226. #CFLAGS += /D_586_ /D__586__
  227.  
  228. ASMFLAGS = /ml /m5 /zi /p /r /t /z /w2 /kh10000 /i$(@:d)
  229.  
  230. .IMPORT : WATCOM
  231.